%% mt_matrix2latex(M),  
% function that takes elements on matrix M (mxn) and display the text need
% to display the matrix in a latex documents
%
% Inputs:
%   M (mxn) matrix, 
%
% Outpus,
%   no outpust arguments, text is display in command window,
%
% -------------------------------------------------------------------------
% matias di martino , matiasdm@fing.edu.uy                         (2013)
% -------------------------------------------------------------------------


function mt_matrix2latex(A);
fprintf('====================================================== \n')
[m n] = size(A);
for i = 1:m,
    for j = 1:n-1,
        fprintf(' $%7.2g$ &',A(i,j))
    end
    fprintf(' $%7.2g$ \\\\ \n',A(i,n))
end

fprintf('====================================================== \n')